Repository navigation
Notify when my own Bots finish or fail a turn, with one Notifications switch - #470
Merged
Birfy merged 4 commits intoOct 20, 2026
Merged
Conversation
Collaborator
Author
|
Self-review: PASS
|
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Oct 20, 2026
This was referenced Oct 20, 2026
…notifications # Conflicts: # patches/ds-bot/0008-client-bundle.patch # patches/ds-bot/topics.json
Birfy
enabled auto-merge
October 20, 2026 02:39
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Oct 20, 2026
Collaborator
Author
|
Self-review PASS (after merging main 465357e): merged
|
…notifications # Conflicts: # patches/ds-bot/0008-client-bundle.patch
Birfy
enabled auto-merge
October 20, 2026 02:44
Collaborator
Author
|
Self-review PASS (after merging main c7898dd): merged
|
This was referenced Oct 20, 2026
Birfy
added a commit
to Birfy/FlyBot
that referenced
this pull request
Oct 20, 2026
ThinkFlowLab#491) Part of ThinkFlowLab#471 (first slice, owner decision 2026-10-20 option a). ThinkFlowLab#471 also lists items the owner deferred (board view, tool-call counts, first-run guide, team views waiting for ThinkFlowLab#51/ThinkFlowLab#149/ThinkFlowLab#55/ThinkFlowLab#57, inbox-side task actions), so this PR does not close it. **What** - **Failed turns in the Agent inbox.** *Needs you* gets a **Failed** card for a turn of my own Bot that failed, read from `work.ended`, the same ended-turn entries the finish/fail notifications use (ThinkFlowLab#353, PR ThinkFlowLab#470); no second event source. A card shows while that failure is the latest ended turn in its place (a Bot's own chat or one group), younger than 7 days, and the Bot is not running or waiting for an approval there. A later finished turn clears it, and that chat is then not also in *Done*. Title: the chat's last line (*The last turn did not finish* without the Session list); reason: the failure text. **Open** only. - **Latest activity row.** Each card may carry one more line, `Latest: …` (full text on hover): a task's newest note, else what its Bot runs there now (running turns and tasks only), else the chat's last line. Left out when it only repeats the title or reason. - Host (`turns.js`): past the last 20 ended turns, a place's latest turn is kept while it is a failure younger than 7 days (at most 50), so busy Bots elsewhere do not push an unresolved failure out of the inbox. Notifications are unaffected (they already skip entries they told or that predate the window). - Out of scope (deferred by the owner): board view, tool-call counts, team views. **Test** - `core/test/inbox.test.js`: failed-turn cards (own Bots only, latest-in-place, cleared by running/waiting/a later finished turn, 7 days, badge count, Open only) and the latest-activity row (sources, no repeats, rendering). `core/test/approval-notices.test.js`: the host keeps a still-latest failure past the last 20 and drops it once a finished turn follows. - `ARCH_DOCS_BASE=origin/main TZ=UTC npm run verify`: pass (core 1080, social 296, tree 80, timeline 83, scripts 93, interop 37, live-e2e 16; 0 failures; plugin lint ok; patches check ok; arch-docs OK). - Not run: live DSH bench / the owner's Mac instances (no visual check in a running shell). Docs: `docs/subsystems/core-client.md` (Agent inbox), `docs/subsystems/core-host.md` (`endedView`). Changelog: `changelog.d/471-inbox-failed-turns.added.md`. Risk tier: T2 (estimate; the controller sets the label) Co-authored-by: Birfy <15378933+Birfy@users.noreply.github.com>
Birfy
added a commit
to Birfy/FlyBot
that referenced
this pull request
Oct 20, 2026
… one notification per chat (ThinkFlowLab#492) Fixes ThinkFlowLab#469 (first slice, owner decision 2026-10-20 option a). Builds on ThinkFlowLab#353's notifications (ThinkFlowLab#470). Quiet hours, mute and an in-app list stay for later; friends'/team notifications wait for ThinkFlowLab#51. **What** - **Waiting too long:** an approval still waiting 15 min after it started (or after the window opened, if it started earlier) gets one more notification: `Coder has waited 15 min for your approval`. A client timer is set for the next due approval and cleared with the effect; a decided approval gets none. - **Per-kind switches:** Settings → General → Notifications keeps the main switch and adds **Waiting for approval** (covers the reminder), **Finished** and **Failed** (`prefs.notify`, on unless `false`; disabled while the main switch is off). `set-prefs` takes `notify: { approval | finished | failed: boolean }`, keeps only the off ones. - **One per chat:** every notification of a chat or group shares the tag `ds-bot-<chat id>`, so a newer one replaces the older, and the body counts the updates (`3 updates`) since the chat was last on screen or its notification clicked. Several events of one chat in one pass become one notification (the newest). - Unchanged: never asks for permission, nothing from before the window opened, a click only opens the chat (no buttons, never approves or sends). **Test** - New tests in `core/test/approval-notices.test.js` (reminder timing and cleanup, reminder for pre-window approvals, per-kind switches, per-chat collapse and count reset, Settings rows) and `install.test.js` (`set-prefs notify`). - `ARCH_DOCS_BASE=origin/main TZ=UTC npm run verify`: pass (core 1082, social 296, tree 80, timeline 83, scripts 93, interop 37, live-e2e 16; 0 failures). `changelog.mjs check`: ok. - Not run: live Mac instances, real OS notifications in a desktop build. Risk tier: T2 (estimate; the controller sets the label) Co-authored-by: Birfy <15378933+Birfy@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #353 (first slice, owner decision 2026-10-20 option a). The rest of #353 (quiet hours, mute, waiting too long, per-trigger switches, merging repeats, friends'/team reminders) is tracked in #469.
What
Coder finished/Coder failed: <reason>(the group name as body for a group turn). Clicking it focuses the window and opens that chat or group. It carries no buttons and never approves, rejects or sends anything.core/src/client/approval-notices.js): only if the OS already allows notifications (never asks), one per event (tag), nothing from before the window opened.turns.jskeeps the last 20 ended turns (endedView, process-local) and they ridelive().work.ended;ownedLivekeeps only the actor's own Bots. Left out: stopped, switched and retried turns, a friend's Bot, turns a friend started, hidden turns another Bot asked for, face-to-face / inbound-share rooms.prefs.notifications), covering approval waiting too.Test
core/test/approval-notices.test.js(client rules, switch, host filter);authz.test.js(narrowing) andinstall.test.js(set-prefs).ARCH_DOCS_BASE=origin/main TZ=UTC npm run verify: pass (core 1033, social 291, tree 80, timeline 80, scripts 88, interop 37, live-e2e 16; 0 failures).Risk tier: T2 (estimate; the controller sets the label)